package com.springboot.service.impl;

import com.springboot.db.entity.User;
import com.springboot.db.entity.UserExample;
import com.springboot.db.mapper.UserMapper;
import com.springboot.service.UserService;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 用户服务类
 *
 * @author supu
 * @create 2019-01-03 18:00
 **/
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public List<User> selectUsers() {
        UserExample example = new UserExample();
        UserExample.Criteria criteria = example.createCriteria();
        criteria.andIdLessThan(3);
        return userMapper.selectByExample(example);
    }
}
